<template>
	<view class="newsDetail">
		<view class="conter" v-html="noticeInfo.noticeContent"></view>
	</view>
</template>

<script>
	import {
		getNotice
	} from '@/api/system/notice.js'

	export default {
		data() {
			return {
				noticeId: 0,
				noticeInfo: {}
			}
		},
		onLoad(options) {
			console.log(options)
			if (options.id) {
				this.noticeId = options.id
			}
			console.log('this.noticeId', this.noticeId)
			this.getProtocol()
		},
		created() {
			console.log('globalConfig', this.globalConfig)
		},
		computed: {},
		methods: {
			goBack() {
				uni.navigateBack()
			},
			getProtocol() {
				let _this = this
				getNotice(_this.noticeId).then(res => {
					console.log('getNotice', res)
					_this.noticeInfo = res.data
					uni.setNavigationBarTitle({
						title: _this.noticeInfo.noticeTitle
					});
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	/*新闻详情*/
	.newsDetail {
		.title {
			padding: 0 30rpx;
			font-size: 34rpx;
			color: #282828;
			font-weight: bold;
			margin: 45rpx 0 23rpx 0;
			line-height: 1.5;
		}

		.list {
			margin: 0 30rpx;
			border-bottom: 1px solid #eee;
			padding-bottom: 25rpx;

			.label {
				font-size: 24rpx;
				height: 38rpx;
				border-radius: 3rpx;
				text-align: center;
				line-height: 36rpx;
				padding: 0 10rpx;
				max-width: 190rpx;
				width: unset;
			}

			.item {
				margin-left: 27rpx;
				font-size: 24rpx;
				color: #999;

				.iconfont {
					font-size: 28rpx;
					margin-right: 10rpx;

					&.icon-shenhezhong {
						font-size: 26rpx;
					}
				}
			}
		}

		.conter {
			padding: 0 30rpx;
			font-size: 30rpx;
			color: #333;
			line-height: 1.8;
			padding-top: 35rpx;

			image {
				width: 100%;
				display: block;
			}
		}

		.picTxt {
			width: 690rpx;
			height: 200rpx;
			border-radius: 20rpx;
			border: 1px solid #e1e1e1;
			position: relative;
			margin: 30rpx auto 0 auto;

			.pictrue {
				width: 200rpx;
				height: 200rpx;

				image {
					width: 100%;
					height: 100%;
					border-radius: 20rpx 0 0 20rpx;
					display: block;
				}
			}

			.text {
				width: 460rpx;

				.name {
					font-size: 30rpx;
					color: #282828;
				}

				.money {
					font-size: 24rpx;
					margin-top: 40rpx;
					font-weight: bold;

					.num {
						font-size: 36rpx;
					}
				}

				.y_money {
					font-size: 26rpx;
					color: #999;
					text-decoration: line-through;
				}
			}

			.label {
				position: absolute;
				background-color: #303131;
				width: 160rpx;
				height: 50rpx;
				right: -7rpx;
				border-radius: 25rpx 0 6rpx 25rpx;
				text-align: center;
				line-height: 50rpx;
				bottom: 24rpx;

				.span {
					background-image: linear-gradient(to right, #fff71e 0%, #f9b513 100%);
					-webkit-background-clip: text;
					-webkit-text-fill-color: transparent;
				}

				&:after {
					content: ' ';
					position: absolute;
					width: 0;
					height: 0;
					border-bottom: 8rpx solid #303131;
					border-right: 8rpx solid transparent;
					top: -8rpx;
					right: 0;
				}
			}
		}

		.bnt {
			color: #fff;
			font-size: 30rpx;
			width: 690rpx;
			height: 90rpx;
			border-radius: 45rpx;
			margin: 48rpx auto 0 auto;
			text-align: center;
			line-height: 90rpx;
		}
	}
</style>